<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>118，我给母校发红包</title>
    <link rel="stylesheet" href="/static/css/frozen.css" th:src="@{/static/css/frozen.css}"/>
    <link rel="stylesheet" href="/static/css/pkuniversity.css" th:src="@{/static/css/pkuniversity.css}"/>
    <script src="/static/js/jquery-1.12.1.min.js" th:src="@{/static/js/jquery-1.12.1.min.js}"/>
    <script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
</head>
<body>
<section layout:fragment="content">

</section>
</body>

<script th:inline="javascript">
    wx.config({
        debug: false,
        appId: /*[[${wx_config_wxAppId}]]*/'',
        timestamp: /*[[${wx_config_timeStamp}]]*/'',
        nonceStr: /*[[${wx_config_nonceStr}]]*/'',
        signature: /*[[${wx_config_signature}]]*/'',
        jsApiList: [
            'checkJsApi',
            'onMenuShareTimeline',
            'onMenuShareAppMessage',
            'onMenuShareQQ',
            'onMenuShareWeibo'
        ]
    });

    if (typeof WeixinJSBridge == "undefined") {
        if (document.addEventListener) {
            document.addEventListener('WeixinJSBridgeReady', shareBrideReady, false);
        } else if (document.attachEvent) {
            document.attachEvent('WeixinJSBridgeReady', shareBrideReady);
            document.attachEvent('onWeixinJSBridgeReady', shareBrideReady);
        }
    } else {
        shareBrideReady();
    }


    function shareBrideReady() {
        wx.ready(function () {
            wx.onMenuShareAppMessage({
                title: '118，我给母校发红包',
                desc: '北京大学118周年校庆活动',
                link: 'http://'+/*[[${globalHostName}+'/peking/index']]*/'',
                imgUrl: 'http://'+/*[[${globalHostName}+'/static/img/pku.jpg']]*/''
            });
            wx.onMenuShareTimeline({
                title: '118，我给母校发红包',
                desc: '北京大学118周年校庆活动',
                link: 'http://' + /*[[${globalHostName}+'/peking/index']]*/'',
                imgUrl: 'http://'+ /*[[${globalHostName}+'/static/img/pku.jpg']]*/''
            });
        });
    }

</script>

<script layout:fragment="script">

</script>
</html>